package com.shujia.test

import java.text.SimpleDateFormat
import java.util.Date

object testDate {
  def main(args: Array[String]): Unit = {
    val str = "Sat Apr 03 09:08:26 +0800 2021"
    val date = new Date(str)
    val dateFormat = new SimpleDateFormat("yyyy-MM-dd hh")
    println(dateFormat.format(date))
  }

}
